package com.songjiakang.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.songjiakang.dao.DromDao;
import com.songjiakang.entity.Drom;
import com.songjiakang.entity.Floor;
import com.songjiakang.entity.Record;
import com.songjiakang.entity.Student;

@Service
public class DromServiceImpl implements DromService{
	@Autowired
	private DromDao dao;
	//登录
	public Student login(Student student) {
		// TODO Auto-generated method stub
		return dao.login(student);
	}
	//学生列表
	public List<Record> list0(Student student) {
		// TODO Auto-generated method stub
		return dao.list0(student);
	}
	//管理员
	
	public PageInfo list1(Integer pageNum, Integer pageSize, String hao, String name) {
		PageHelper.startPage(pageNum, pageSize);
		List<Record> list1 = dao.list1(hao,name);
		PageInfo info = new PageInfo(list1);
		return info;
	};
	//详情上半页面
	public Record shang(Integer id) {
		// TODO Auto-generated method stub
		return dao.shang(id);
	}
	//下半页面
	public List<Record> xia(Integer id) {
		// TODO Auto-generated method stub
		return dao.xia(id);
	}
	//调室的人
	public List<Student> getstudent() {
		// TODO Auto-generated method stub
		return dao.getstudent();
	}
	//查询楼
	public List<Floor> floor() {
		// TODO Auto-generated method stub
		return dao.floor();
	}
	//楼下的宿舍号
	public List<Drom> drom(Integer id) {
		// TODO Auto-generated method stub
		return dao.drom(id);
	}
}
